package com.base.logistics.sf.bean.order;

import com.base.logistics.sf.bean.Result;
import com.base.logistics.utils.SfGsonBuilder;

import java.io.Serializable;
import java.util.List;

/**
 * <pre>
 * 订单确认/取消响应对象
 * </pre>
 * @since 2021-02-17
 */
public class UpdateOrderResponse implements Serializable {

    /**
     * 客户订单号
     */
    private String orderId;

    /**
     * <pre>
     *     备注
     *     1:客户订单号与顺丰运单不匹配
     *     2 :操作成功
     * </pre>
     */
    private Integer resStatus;

    /**
     * 顺丰运单号
     */
    private List<WaybillNoInfo> waybillNoInfoList;

    /**
     * 扩展属性
     */
    private List<ExtraInfo> extraInfoList;

    public UpdateOrderResponse() {
    }


    public static UpdateOrderResponse fromJson(String json) {
        Result data = SfGsonBuilder.create().fromJson(json, Result.class);
        json = SfGsonBuilder.create().toJson(data.getMsgData());
        return SfGsonBuilder.create().fromJson(json, UpdateOrderResponse.class);
    }

    public String getOrderId() {
        return this.orderId;
    }

    public Integer getResStatus() {
        return this.resStatus;
    }

    public List<WaybillNoInfo> getWaybillNoInfoList() {
        return this.waybillNoInfoList;
    }

    public List<ExtraInfo> getExtraInfoList() {
        return this.extraInfoList;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public void setResStatus(Integer resStatus) {
        this.resStatus = resStatus;
    }

    public void setWaybillNoInfoList(List<WaybillNoInfo> waybillNoInfoList) {
        this.waybillNoInfoList = waybillNoInfoList;
    }

    public void setExtraInfoList(List<ExtraInfo> extraInfoList) {
        this.extraInfoList = extraInfoList;
    }

}
